﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MoiCare
{
    /// <summary>
    /// Event
    /// </summary>
    public abstract class Event
    {
        /// <summary>
        /// Trigger : The trigger condition for event.
        /// </summary>
        public DateTime Trigger = new DateTime();
        /// <summary>
        /// Event() : The default constructor.
        /// </summary>
        public Event() {
            Trigger = DateTime.Now;
        }
        /// <summary>
        /// Handle() : Handle The Event , The Interface for Instance.
        /// </summary>
        public void Handle(object obj)
        {
            this.Inc();
            this.EventHandler();
        }
        /// <summary>
        /// Inc() : Trigger time interval.
        /// </summary>
        protected abstract void Inc();
        /// <summary>
        /// EventHandler() : Actual processing function.
        /// </summary>
        protected abstract void EventHandler();
    }
}
